#ifndef MAP_H
#define MAP_H

#include <vector>
using std::vector;

struct Tile
{
	int tileSetX;
	int tileSetY;
	int tileSetIndex;
};

struct Tileset
{
	int texID;
	int setWidth;
	int setHeight;
	int tileWidth;
	int tileHeight;
};

class Map
{
public:
	Map(short _mapWidth = 0, short _mapHeight = 0, short _tileWidth = 0, short _tileHeight = 0);
	~Map();

	void SetDimensions(short _mapWidth, short _mapHeight, short _tileWidth, short _tileHeight);

	void LoadTileset(const char* _fileName, short _setWidth, short _setHeight, short _tileWidth, short _tileHeight);
	void LoadTile(short _tilesetX, short _tilesetY, short _tilesetIndex);

	void Render();

	short GetMapPixelWidth()	{return mapWidth * tileWidth;}
	short GetMapPixelHeight()	{return mapHeight * tileHeight;}

private:
	short mapWidth;
	short mapHeight;
	short tileWidth;
	short tileHeight;
	vector<Tile> tileVec;
	vector<Tileset> tileSetVec;
};

#endif	// MAP_H